package com.docker.upload;

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author ldl
 * @Create 2020/10/31 031 16:03
 */
public class UploadConstant {

    // == 上传文件大小 ====
    public static final Integer UP_SIZE_50K = 50 * 1024;
    public static final Integer UP_SIZE_3M = 3 * 1024 * 1024;
    public static final Integer UP_SIZE_5M = 5 * 1024 * 1024;
    public static final Integer UP_SIZE_10M = 10 * 1024 * 1024;
    public static final Integer UP_SIZE_20M = 20 * 1024 * 1024;
    public static final Integer UP_SIZE_30M = 30 * 1024 * 1024;
    public static final Integer UP_SIZE_50M = 50 * 1024 * 1024;
    public static final Integer UP_SIZE_100M = 100 * 1024 * 1024;

    public static final List<String> uploadCodeList = new ArrayList<>();
    public static final Map<String, List<String>> fileMap = new HashMap<>();
    public static final Map<String, Integer> fileSize = new HashMap<>();
    public static final Map<String, String> pathMap = new HashMap<>();

    public static final String docker_ssl = "docker_ssl";//docker_ssl文件
    public static final String docker_ssl_path = File.separator + "upload" + File.separator + "docker_ssl";

    static {
        List<String> img = new ArrayList<>();
        img.add("png");
        img.add("jpg");

        List<String> excel = new ArrayList<>();
        excel.add("xls");
        excel.add("xlsx");

        List<String> certs = new ArrayList<>();
        certs.add("pem");
        certs.add("srl");

        uploadCodeList.add(docker_ssl);
        fileMap.put(docker_ssl, certs);
        fileSize.put(docker_ssl, UP_SIZE_50K);
        pathMap.put(docker_ssl, docker_ssl_path);

    }

}
